<template>
  <div class="project">
    <!-- <el-scrollbar> -->
    <el-form
      :model="basicForm"
      label-position="top"
      :rules="basicRules"
      ref="basicFormRef"
    >
      <!-- 基本信息 -->
      <div class="project-part">
        <div class="project-part-title">基本信息</div>
        <div class="project-part-content">
          <el-row :gutter="24">
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item
                label="项目编号"
                prop="projectNo"
              >
                <el-input
                  v-model="basicForm.projectNo"
                  :disabled="getEnterpriseDisabled()"
                ></el-input>
              </el-form-item>
            </el-col>
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item label="项目分类">
                <el-select
                  placeholder="项目分类"
                  v-model="basicForm.projectType"
                  :disabled="getEnterpriseDisabled()"
                  clearable
                >
                  <el-option
                    v-for="item in projectTypeOptions"
                    :key="item.dictValue"
                    :label="item.dictText"
                    :value="item.dictValue"
                  >
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item
                label="项目名称"
                prop="projectName"
              >
                <el-input
                  :disabled="getEnterpriseDisabled()"
                  v-model="basicForm.projectName"
                ></el-input>
              </el-form-item>
            </el-col>
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item label="四大结构调整">
                <el-select
                  placeholder="四大结构调整"
                  v-model="basicForm.projectSdjg"
                  :disabled="getEnterpriseDisabled()"
                  clearable
                >
                  <el-option
                    v-for="item in projectStructOptions"
                    :key="item.dictValue"
                    :label="item.dictText"
                    :value="item.dictValue"
                  >
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item label="细分类型">
                <el-select
                  placeholder="细分类型"
                  v-model="basicForm.xflx"
                  :disabled="getEnterpriseDisabled()"
                  clearable
                >
                  <el-option
                    v-for="item in projectDivisionOptions"
                    :key="item.dictValue"
                    :label="item.dictText"
                    :value="item.dictValue"
                  >
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item label="建设周期" prop="jszqArr">
                <el-date-picker
                  v-model="basicForm.jszqArr"
                  type="monthrange"
                  range-separator="至"
                  unlink-panels
                  start-placeholder="开始月份"
                  end-placeholder="结束月份"
                  value-format="yyyy-MM"
                  :disabled="getEnterpriseDisabled()"
                  @change="changeJszq"
                >
                </el-date-picker>
              </el-form-item>
            </el-col>
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item label="资金来源">
                <el-select
                  placeholder="资金来源"
                  v-model="basicForm.zjly"
                  :disabled="getEnterpriseDisabled()"
                  clearable
                >
                  <el-option
                    v-for="item in projectCapitalOptions"
                    :key="item.dictValue"
                    :label="item.dictText"
                    :value="item.dictValue"
                  >
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item label="项目状态">
                <el-select
                  placeholder="项目状态"
                  v-model="basicForm.projectStatus"
                  :disabled="getEnterpriseDisabled()"
                  clearable
                >
                  <el-option
                    v-for="item in projectStatusOptions"
                    :key="item.dictValue"
                    :label="item.dictText"
                    :value="item.dictValue"
                  >
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item
                label="具体建设内容 - 道路"
                prop="jsnrDl"
              >
                <el-input
                  v-model="basicForm.jsnrDl"
                  :disabled="getEnterpriseDisabled()"
                >
                  <template slot="append">公里</template>
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item
                label="具体建设内容 - 景观"
                prop="jsnrJg"
              >
                <el-input
                  v-model="basicForm.jsnrJg"
                  :disabled="getEnterpriseDisabled()"
                >
                  <template slot="append"
                    >万平方米</template
                  >
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item
                label="具体建设内容 - 房建"
                prop="jsnrFj"
              >
                <el-input
                  v-model="basicForm.jsnrFj"
                  :disabled="getEnterpriseDisabled()"
                >
                  <template slot="append"
                    >万平方米</template
                  >
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item
                label="具体建设内容 - 综合管廊"
                prop="jsnrZhgl"
              >
                <el-input
                  v-model="basicForm.jsnrZhgl"
                  :disabled="getEnterpriseDisabled()"
                >
                  <template slot="append">公里</template>
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item label="建设规模" prop="jsgm">
                <el-input
                  type="textarea"
                  v-model="basicForm.jsgm"
                  :disabled="getEnterpriseDisabled()"
                  :rows="4"
                ></el-input>
              </el-form-item>
            </el-col>
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item label="建设单位" prop="jsgs">
                <el-select
                  placeholder="建设单位"
                  v-model="basicForm.jsgs"
                  :disabled="getEnterpriseDisabled()"
                  clearable
                  @change="handleChangeJSGS"
                >
                  <el-option
                    v-for="item in projectCompanyOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  >
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item label="备注" prop="desc">
                <el-input
                  type="textarea"
                  v-model="basicForm.remark"
                  :rows="4"
                  :disabled="getEnterpriseDisabled()"
                ></el-input>
              </el-form-item>
            </el-col>
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item label="经纬度" prop="address">
                <el-input
                  v-model="basicForm.address"
                  :disabled="getAdminDisabled()"
                  placeholder="如：104.450373,30.316121"
                ></el-input>
                <i
                  class="el-icon-location"
                  @click="handleShowMap"
                ></i>
              </el-form-item>
            </el-col>
          </el-row>
        </div>
      </div>

      <!-- 责任信息 -->
      <div class="project-part">
        <div class="project-part-title">责任信息</div>
        <div class="project-part-content">
          <div class="project-part-content-title">
            建设单位
          </div>
          <el-row :gutter="24">
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item label="建设单位">
                <el-input
                  v-model="basicForm.ssdw"
                  :disabled="getAdminDisabled()"
                ></el-input>
              </el-form-item>
            </el-col>
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item label="前期负责人及联系电话">
                <el-input
                  v-model="basicForm.qqfzr"
                  :disabled="getAdminDisabled()"
                ></el-input>
              </el-form-item>
            </el-col>
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item label="设计负责人及联系电话">
                <el-input
                  v-model="basicForm.sjfzr"
                  :disabled="getAdminDisabled()"
                ></el-input>
              </el-form-item>
            </el-col>
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item label="工程负责人及联系电话">
                <el-input
                  v-model="basicForm.gcfzr"
                  :disabled="getAdminDisabled()"
                ></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <div class="project-part-content-title">
            设计单位
          </div>
          <el-row :gutter="24">
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item label="设计单位">
                <el-input
                  v-model="basicForm.sjdw"
                  :disabled="getAdminDisabled()"
                ></el-input>
              </el-form-item>
            </el-col>
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item label="设计代表及联系电话">
                <el-input
                  v-model="basicForm.sjdb"
                  :disabled="getAdminDisabled()"
                ></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <div class="project-part-content-title">
            勘察单位
          </div>
          <el-row :gutter="24">
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item label="勘察单位">
                <el-input
                  v-model="basicForm.kcdw"
                  :disabled="getAdminDisabled()"
                ></el-input>
              </el-form-item>
            </el-col>
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item label="勘察负责人及联系电话">
                <el-input
                  v-model="basicForm.kcfzr"
                  :disabled="getAdminDisabled()"
                ></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <!-- <div class="project-part-content-title">
            施工单位
          </div> -->
          <!-- <el-row :gutter="24">
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item label="施工单位">
                <el-input
                  v-model="basicForm.sgdw"
                  :disabled="getAdminDisabled()"
                ></el-input>
              </el-form-item>
            </el-col>
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item label="项目经理及联系电话">
                <el-input
                  v-model="basicForm.xmjl"
                  :disabled="getAdminDisabled()"
                ></el-input>
              </el-form-item>
            </el-col>
          </el-row> -->
          <!-- <div class="project-part-content-title">
            监理单位
          </div> -->
          <!-- <el-row :gutter="24">
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item label="监理单位">
                <el-input
                  v-model="basicForm.jldw"
                  :disabled="getAdminDisabled()"
                ></el-input>
              </el-form-item>
            </el-col>
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item label="总监及联系电话">
                <el-input
                  v-model="basicForm.zj"
                  :disabled="getAdminDisabled()"
                ></el-input>
              </el-form-item>
            </el-col>
          </el-row> -->
        </div>
      </div>

      <!-- 标段信息 -->
      <div class="project-part">
        <div class="project-part-title">
          标段信息
          <div
            class="project-part-title-btn"
            @click="handleAdd"
            v-if="!getAdminDisabled()"
          >
            新增标段
          </div>
        </div>
        <div class="project-part-content">
          <table class="table">
            <thead>
              <tr>
                <th style="width: 50px">序号</th>
                <th style="width: calc(20% - 20px)">
                  标段名称
                </th>
                <th style="width: calc(20% - 20px)">
                  施工单位
                </th>
                <th style="width: calc(20% - 20px)">
                  项目经理及联系电话
                </th>
                <th style="width: calc(20% - 20px)">
                  监理单位
                </th>
                <th style="width: calc(20% - 20px)">
                  总监及联系电话
                </th>
                <th
                  style="width: 50px"
                  v-if="!getAdminDisabled()"
                >
                  操作
                </th>
              </tr>
            </thead>
            <tbody>
              <tr
                v-for="(
                  item, index
                ) in basicForm.sectionInfoList"
                :key="index"
              >
                <td style="width: 50px">
                  {{ item.orderIndex }}
                </td>
                <td style="width: calc(20% - 20px)">
                  <el-form-item
                    label=""
                    :prop="
                      'sectionInfoList.' +
                      index +
                      '.sectionName'
                    "
                    :rules="basicRules.sectionName"
                  >
                    <el-input
                      v-model="item.sectionName"
                      :disabled="getAdminDisabled()"
                    ></el-input>
                  </el-form-item>
                </td>
                <td style="width: calc(20% - 20px)">
                  <el-form-item label="">
                    <el-input
                      v-model="item.buildUnit"
                      :disabled="getAdminDisabled()"
                    ></el-input>
                  </el-form-item>
                </td>
                <td style="width: calc(20% - 20px)">
                  <el-form-item label="">
                    <el-input
                      v-model="item.buildLeader"
                      :disabled="getAdminDisabled()"
                      placeholder="姓名-电话号码"
                    ></el-input>
                  </el-form-item>
                </td>
                <td style="width: calc(20% - 20px)">
                  <el-form-item label="">
                    <el-input
                      v-model="item.supervisorUnit"
                      :disabled="getAdminDisabled()"
                    ></el-input>
                  </el-form-item>
                </td>
                <td style="width: calc(20% - 20px)">
                  <el-form-item label="">
                    <el-input
                      v-model="item.supervisor"
                      :disabled="getAdminDisabled()"
                      placeholder="姓名-电话号码"
                    ></el-input>
                  </el-form-item>
                </td>
                <td
                  style="width: 50px"
                  v-if="!getAdminDisabled()"
                >
                  <div
                    class="table-btn"
                    @click="handleDelete(index, item)"
                  >
                    删除
                  </div>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>

      <!-- 用地信息 -->
      <div class="project-part" v-loading="uploadLoading">
        <div class="project-part-title">用地信息</div>
        <div class="project-part-content">
          <el-row :gutter="24">
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item label="用地面积" prop="ydmj">
                <el-input
                  v-model="basicForm.ydmj"
                  :disabled="getAdminDisabled()"
                >
                  <template slot="append">亩</template>
                  <!-- <div slot="suffix" class="suffix">亩</div> -->
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item
                label="用地面积-上传范围（东带）"
              >
                <el-upload
                  action="#"
                  class="upload"
                  :show-file-list="false"
                  :drag="false"
                  :on-change="onFileSelect"
                  :auto-upload="false"
                  v-if="!getAdminDisabled()"
                  accept=".dwg"
                >
                  <span @click="uploadFile('yd')">
                    <span class="upload-icon"></span>
                    <span class="upload-text"
                      >点击上传</span
                    >
                  </span>
                </el-upload>

                <el-input
                  v-model="basicForm.ydmjDdFile"
                  placeholder="暂无文件"
                  :disabled="getAdminDisabled()"
                  clearable
                ></el-input>

                <el-progress
                  v-if="
                    currentType === 'yd' &&
                    completePercentObj[currentType] !== 0 &&
                    completePercentObj[currentType] !== 100
                  "
                  :percentage="
                    completePercentObj[currentType]
                  "
                  color="#409eff"
                ></el-progress>
              </el-form-item>
            </el-col>
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item
                label="用地面积-上传范围（2000）"
              >
                <el-upload
                  action="#"
                  class="upload"
                  :show-file-list="false"
                  :drag="false"
                  :on-change="onFileSelect"
                  :auto-upload="false"
                  v-if="!getAdminDisabled()"
                  accept=".dwg"
                >
                  <span @click="uploadFile('yd2000')">
                    <span class="upload-icon"></span>
                    <span class="upload-text"
                      >点击上传</span
                    >
                  </span>
                </el-upload>
                <el-input
                  v-model="basicForm.ydmjLqFile"
                  placeholder="暂无文件"
                  :disabled="getAdminDisabled()"
                  clearable
                ></el-input>

                <el-progress
                  v-if="
                    currentType === 'yd2000' &&
                    completePercentObj[currentType] !== 0 &&
                    completePercentObj[currentType] !== 100
                  "
                  :percentage="
                    completePercentObj[currentType]
                  "
                  color="#409eff"
                ></el-progress>
                <el-button
                  size="small"
                  class="preview-button"
                  @click="previewMap('yd2000')"
                  v-if="basicForm.bpmStatus !== '0'"
                  >地图预览</el-button
                >
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="24">
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item label="红线面积" prop="hxmj">
                <el-input
                  v-model="basicForm.hxmj"
                  :disabled="getAdminDisabled()"
                >
                  <template slot="append">亩</template>
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item
                label="红线面积-上传范围（东带）"
              >
                <el-upload
                  action="#"
                  class="upload"
                  :show-file-list="false"
                  :drag="false"
                  :on-change="onFileSelect"
                  :auto-upload="false"
                  v-if="!getAdminDisabled()"
                  accept=".dwg"
                >
                  <span @click="uploadFile('hx')">
                    <span class="upload-icon"></span>
                    <span class="upload-text"
                      >点击上传</span
                    >
                  </span>
                </el-upload>
                <el-input
                  v-model="basicForm.hxmjDdFile"
                  placeholder="暂无文件"
                  :disabled="getAdminDisabled()"
                  clearable
                ></el-input>

                <el-progress
                  v-if="
                    currentType === 'hx' &&
                    completePercentObj[currentType] !== 0 &&
                    completePercentObj[currentType] !== 100
                  "
                  :percentage="
                    completePercentObj[currentType]
                  "
                  color="#409eff"
                ></el-progress>
              </el-form-item>
            </el-col>
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item
                label="红线面积-上传范围（2000）"
              >
                <el-upload
                  action="#"
                  class="upload"
                  :show-file-list="false"
                  :drag="false"
                  :on-change="onFileSelect"
                  :auto-upload="false"
                  v-if="!getAdminDisabled()"
                  accept=".dwg"
                >
                  <span @click="uploadFile('hx2000')">
                    <span class="upload-icon"></span>
                    <span class="upload-text"
                      >点击上传</span
                    >
                  </span>
                </el-upload>
                <el-input
                  v-model="basicForm.hxmjLqFile"
                  placeholder="暂无文件"
                  :disabled="getAdminDisabled()"
                  clearable
                ></el-input>

                <el-progress
                  v-if="
                    currentType === 'hx2000' &&
                    completePercentObj[currentType] !== 0 &&
                    completePercentObj[currentType] !== 100
                  "
                  :percentage="
                    completePercentObj[currentType]
                  "
                  color="#409eff"
                ></el-progress>
                <el-button
                  size="small"
                  @click="previewMap('hx2000')"
                  class="preview-button"
                  v-if="basicForm.bpmStatus !== '0'"
                  >地图预览</el-button
                >
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="24">
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item
                label="实施范围面积"
                prop="ssfwjj"
              >
                <el-input
                  v-model="basicForm.ssfwjj"
                  :disabled="getAdminDisabled()"
                >
                  <template slot="append">亩</template>
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item
                label="实施范围面积-上传范围（东带）"
              >
                <el-upload
                  action="#"
                  class="upload"
                  :show-file-list="false"
                  :drag="false"
                  :on-change="onFileSelect"
                  :auto-upload="false"
                  v-if="!getAdminDisabled()"
                  accept=".dwg"
                >
                  <span @click="uploadFile('ss')">
                    <span class="upload-icon"></span>
                    <span class="upload-text"
                      >点击上传</span
                    >
                  </span>
                </el-upload>
                <el-input
                  v-model="basicForm.ssfwDdFile"
                  placeholder="暂无文件"
                  :disabled="getAdminDisabled()"
                  clearable
                ></el-input>

                <el-progress
                  v-if="
                    currentType === 'ss' &&
                    completePercentObj[currentType] !== 0 &&
                    completePercentObj[currentType] !== 100
                  "
                  :percentage="
                    completePercentObj[currentType]
                  "
                  color="#409eff"
                ></el-progress>
              </el-form-item>
            </el-col>
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item
                label="实施范围面积-上传范围（2000）"
              >
                <el-upload
                  action="#"
                  class="upload"
                  :show-file-list="false"
                  :drag="false"
                  :on-change="onFileSelect"
                  :auto-upload="false"
                  v-if="!getAdminDisabled()"
                  accept=".dwg"
                >
                  <span @click="uploadFile('ss2000')">
                    <span class="upload-icon"></span>
                    <span class="upload-text"
                      >点击上传</span
                    >
                  </span>
                </el-upload>
                <el-input
                  v-model="basicForm.ssfwLqFile"
                  placeholder="暂无文件"
                  :disabled="getAdminDisabled()"
                  clearable
                ></el-input>

                <el-progress
                  v-if="
                    currentType === 'ss2000' &&
                    completePercentObj[currentType] !== 0 &&
                    completePercentObj[currentType] !== 100
                  "
                  :percentage="
                    completePercentObj[currentType]
                  "
                  color="#409eff"
                ></el-progress>
                <el-button
                  size="small"
                  @click="previewMap('ss2000')"
                  class="preview-button"
                  v-if="basicForm.bpmStatus !== '0'"
                  >地图预览</el-button
                >
              </el-form-item>
            </el-col>
          </el-row>
        </div>
      </div>

      <!-- 资金来源 -->
      <div class="project-part">
        <div class="project-part-title">资金来源</div>
        <div class="project-part-content">
          <el-row :gutter="24">
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item label="总投资" prop="ztz">
                <el-input
                  v-model="basicForm.ztz"
                  :disabled="getEnterpriseDisabled()"
                >
                  <template slot="append">万元</template>
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item label="土地费" prop="tdf">
                <el-input
                  v-model="basicForm.tdf"
                  :disabled="getEnterpriseDisabled()"
                >
                  <template slot="append">万元</template>
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item label="工程费" prop="gcf">
                <el-input
                  v-model="basicForm.gcf"
                  :disabled="getEnterpriseDisabled()"
                >
                  <template slot="append">万元</template>
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item label="其他费" prop="qtf">
                <el-input
                  v-model="basicForm.qtf"
                  :disabled="getEnterpriseDisabled()"
                >
                  <template slot="append">万元</template>
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item label="是否发债">
                <el-select
                  placeholder="是否发债"
                  v-model="basicForm.isfz"
                  :disabled="getAdminDisabled()"
                  clearable
                >
                  <el-option
                    v-for="item in projectIssueOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  >
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item label="发债类型">
                <!-- <el-select
                  placeholder="发债类型"
                  v-model="basicForm.fzlx"
                  :disabled="
                    getAdminDisabled()
                  "
                  clearable
                >
                  <el-option
                    v-for="item in projectIssueTypeOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  >
                  </el-option>
                </el-select> -->
                <el-input
                  v-model="basicForm.fzlx"
                  :disabled="getAdminDisabled()"
                >
                </el-input>
              </el-form-item>
            </el-col>
          </el-row>
        </div>
      </div>

      <!-- 审批信息 -->
      <div class="project-part">
        <div class="project-part-title">审批信息</div>
        <div class="project-part-content">
          <el-row :gutter="24">
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item
                label="立项文号（如有变更，请写多个）"
              >
                <el-input
                  v-model="basicForm.lxwh"
                  :disabled="getAdminDisabled()"
                ></el-input>
              </el-form-item>
            </el-col>
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item
                label="立项时间（如有变更，请写多个）"
              >
                <el-input
                  v-model="basicForm.lxsj"
                  :disabled="getAdminDisabled()"
                ></el-input>
              </el-form-item>
            </el-col>
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item
                label="可研文号（如有变更，请写多个）"
              >
                <el-input
                  v-model="basicForm.kywh"
                  :disabled="getAdminDisabled()"
                >
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item
                label="可研时间（如有变更，请写多个）"
              >
                <el-input
                  v-model="basicForm.kysj"
                  :disabled="getAdminDisabled()"
                ></el-input>
              </el-form-item>
            </el-col>
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item label="方案确定时间">
                <el-date-picker
                  v-model="basicForm.fzqdsj"
                  type="date"
                  placeholder="方案确定时间"
                  value-format="yyyy-MM-dd"
                  :disabled="getAdminDisabled()"
                >
                </el-date-picker>
              </el-form-item>
            </el-col>
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item label="初步设计审查时间">
                <el-date-picker
                  v-model="basicForm.cbsjshsj"
                  type="date"
                  placeholder="初步设计审查时间"
                  value-format="yyyy-MM-dd"
                  :disabled="getAdminDisabled()"
                >
                </el-date-picker>
              </el-form-item>
            </el-col>
            <el-col :sm="24" :md="12" :lg="8" :xl="6">
              <el-form-item label="施工图审查时间">
                <el-date-picker
                  v-model="basicForm.sgtshsj"
                  type="date"
                  placeholder="施工图审查时间"
                  value-format="yyyy-MM-dd"
                  :disabled="getAdminDisabled()"
                >
                </el-date-picker>
              </el-form-item>
            </el-col>
          </el-row>
        </div>
      </div>

      <div class="project-part">
        <div class="project-part-title">
          项目效果图
          <el-upload
            action="#"
            :show-file-list="false"
            :drag="false"
            :on-change="onImageListSelect"
            :auto-upload="false"
            accept="image/png,image/jpg,image/jpeg"
            multiple
            :disabled="getEnterpriseDisabled()"
          >
            <span
              class="upload-image"
              v-if="!getEnterpriseDisabled()"
            >
              <div class="upload-image-icon"></div>
              <div class="upload-image-text">上传照片</div>
            </span>
          </el-upload>
        </div>

        <div class="progress">
          <div
            class="progress-item"
            v-for="(i, index) of basicForm.effectPicList"
            :key="index"
          >
            <el-image
              :src="getImage(i.pictureId)"
              :preview-src-list="
                basicForm.effectPicList.map((item) =>
                  getImage(item.pictureId)
                )
              "
            />
            <i
              class="el-icon-error"
              @click="deletePhoto(index)"
              v-if="!getEnterpriseDisabled()"
            ></i>
            <div class="progress-item-form">
              <el-form-item label="图片名称">
                <el-input
                  placeholder="请输入图片名称"
                  v-model="i.pictureIntroduce"
                  :disabled="getEnterpriseDisabled()"
                  :rows="3"
                >
                </el-input>
              </el-form-item>
            </div>
          </div>
        </div>
      </div>
    </el-form>

    <customizeDialog
      :visible="dialogMapVisible"
      v-if="dialogMapVisible"
      @update:visible="dialogMapVisible = $event"
      ref="dialog"
      :title="`${headerTitle}`"
      :titleTip="`当前面积：${currentArea}m²`"
      :width="'1200px'"
      top="100px"
      :close-on-click-modal="false"
      :close-on-press-escape="false"
      :has-footer="false"
      customPadding="0px"
    >
      <div
        v-loading="loading"
        element-loading-text="文件正在解析中，请稍后..."
      >
        <MapView
          :viewer-id="viewerId"
          :key="countMapLoad"
          @onload="onMapLoad"
        />
        <Utool
          :viewerId="viewerId"
          :position="{ top: '60px', right: '20px' }"
          :t="[]"
          :b="[
            {
              title: '初始位置',
              icon: 'dingwei'
            }
          ]"
          :showMore="false"
        ></Utool>
      </div>
    </customizeDialog>
    <!-- </el-scrollbar> -->

    <locationDailog
      ref="locationDialogRef"
      :address="basicForm.address"
      :diasbled="getAdminDisabled()"
      @sure="handleChangeAddress"
    />
  </div>
</template>

<script>
import {
  typeOptions,
  structOptions,
  divisionOptions,
  capitalOptions,
  statusOptions,
  companyOptions,
  issueOptions,
  issueTypeOptions
} from '@/utils/project/data.js'
import {
  dwgFileUpload,
  queryJsgsList,
  dwgFileById,
  queryJudgeExist
} from '@/api/projectMessage'
import { queryOptions } from '@/api/dict'
import { isAdmin, isEnterprise } from '@/utils/permission'
import MapView from '@/components/mapView'
import { getAction } from '@/utils/helper'
import Utool from '@/components/utool/index-land'
import customizeDialog from '@/components/checkHistory/customizeDialog.vue'
import locationDailog from '@/components/locationDialog'
import { BASE_URL } from '@/api/config.js'

import {
  securityFileUrl,
  noticeFileUpload
} from '@/api/wisdomBuild'
import { phone, float } from '@/utils/formrule'
import { globalBaseMap } from '@/utils/basemap'
import request from '@/utils/request'
import * as turf from '@turf/turf'
import axios from 'axios'
let _layerManager, _viewer
const mapViewer = {}

export default {
  // inject: ['viewerId'],
  props: {
    isSaveClick: Boolean,
    detailInfo: Object,
    projectStatus: String,
    isView: Boolean,
    isCheck: Boolean,
    bpmStatus: String
  },
  components: {
    MapView,
    Utool,
    customizeDialog,
    locationDailog
  },
  data() {
    return {
      basicForm: {
        projectNo: '',
        projectType: '',
        projectName: '',
        projectSdjg: '',
        xflx: '',
        jsgm: '',
        jsgs: '',
        jszqArr: '',
        zjly: '',
        projectStatus: '0',
        jsnrDl: '',
        jsnrJg: '',
        jsnrFj: '',
        jsnrZhgl: '',
        remark: '',
        address: '',
        ssdw: '',
        kcdw: '',
        sjdw: '',
        sgdw: '',
        qqfzr: '',
        kcfzr: '',
        sjfzr: '',
        sjdb: '',
        gcfzr: '',
        xmjl: '',
        jldw: '',
        zj: '',
        ydmj: '',
        ydmjDdFile: '',
        ydmjLqFile: '',
        ydmjFwdd: '',
        landEastJson: '',
        ydmjFwlq: '',
        landJson: '',
        hxmj: '',
        hxmjDdFile: '',
        hxmjLqFile: '',
        hxmjFwdd: '',
        redEastJson: '',
        hxmjFwlq: '',
        redJson: '',
        ssfwjj: '',
        ssfwDdFile: '',
        ssfwLqFile: '',
        ssfwFwdd: '',
        rangeEastJson: '',
        ssfwFwlq: '',
        rangeJson: '',
        ztz: '',
        tdf: '',
        gcf: '',
        qtf: '',
        isfz: '',
        fzlx: '',
        lxwh: '',
        lxsj: '',
        kywh: '',
        kysj: '',
        fzqdsj: '',
        cbsjshsj: '',
        sgtshsj: '',
        bpmStatus: '0',
        effectPicList: [],
        sectionInfoList: []
      },
      typeOptions: [],
      projectTypeOptions: [], // 项目分类
      projectStructOptions: [], // 四大结构调整
      projectDivisionOptions: [], // 细分类型
      projectCapitalOptions: [], // 资金来源
      projectStatusOptions: [], // 项目状态
      projectCompanyOptions: [], // 建设单位
      projectIssueOptions: [], // 是否发债
      projectIssueTypeOptions: [], // 发债类型
      dialogMapVisible: false,
      viewerId: 'dwgMap',
      // viewerId: 'supermap-container',
      currentFeature: '',
      currentArea: 0,
      headerTitle: '',
      basicRules: {
        projectNo: [
          {
            required: true,
            message: '请输入项目编号',
            trigger: 'blur'
          }
        ],
        projectName: [
          {
            required: true,
            message: '请输入项目名称',
            trigger: 'blur'
          }
        ],
        sectionName: [
          {
            required: true,
            message: '请输入标段名称',
            trigger: 'blur'
          }
        ],
        // jszq: [
        //   {
        //     required: true,
        //     message: '请选择建设周期',
        //     trigger: 'change'
        //   }
        // ],
        jsgs: [
          {
            required: true,
            message: '请选择建设单位',
            trigger: 'change'
          }
        ],
        jsnrDl: [float],
        jsnrJg: [float],
        jsnrFj: [float],
        jsnrZhgl: [float],
        ydmj: [float],
        hxmj: [float],
        ssfwjj: [float],
        ztz: [float],
        tdf: [float],
        gcf: [float],
        qtf: [float]
      },
      fileList: [],
      currentType: '',
      loading: false,
      checkStatus: '0',
      countMapLoad: 0,
      uploadLoading: false,
      // 上传文件进度条
      completePercentObj: {
        yd: 0,
        yd2000: 0,
        hx: 0,
        hx2000: 0,
        ss: 0,
        ss2000: 0
      }
    }
  },
  async created() {
    this.projectCompanyOptions = companyOptions
    this.projectIssueOptions = issueOptions
    this.projectIssueTypeOptions = issueTypeOptions
  },
  computed: {},
  watch: {
    isSaveClick() {
      this.$refs.basicFormRef.validate((valid) => {
        if (valid) {
          const jszq = this.basicForm.jszqArr
            ? JSON.stringify(this.basicForm.jszqArr)
            : ''
          this.basicForm.jszq = JSON.parse(
            JSON.stringify(jszq)
          )
          this.$emit(
            'setProjectInfo',
            this.basicForm,
            this.fileList,
            true
          )
        } else {
          this.$emit(
            'setProjectInfo',
            this.basicForm,
            this.fileList,
            false
          )
          return false
        }
      })
      // this.$emit('setProjectInfo', this.basicForm)
    },
    detailInfo(val) {
      if (val.pkid) {
        this.basicForm = Object.assign(
          this.basicForm,
          this.detailInfo
        )
        this.basicForm.jszqArr = this.detailInfo.jszq
          ? JSON.parse(this.detailInfo.jszq)
          : ''
      }
    },

    'basicForm.ydmjDdFile': function (val) {
      if (val === '') {
        this.deteleFile('yd')
        this.basicForm.ydmjFwdd = ''
        this.basicForm.landEastJson = ''
      }
    },
    'basicForm.ydmjLqFile': function (val) {
      if (val === '') {
        this.deteleFile('yd2000')
        this.basicForm.ydmjFwlq = ''
        this.basicForm.landJson = ''
      }
    },
    'basicForm.hxmjDdFile': function (val) {
      if (val === '') {
        this.deteleFile('hx')
        this.basicForm.hxmjFwdd = ''
        this.basicForm.redEastJson = ''
      }
    },
    'basicForm.hxmjLqFile': function (val) {
      if (val === '') {
        this.deteleFile('hx2000')
        this.basicForm.hxmjFwlq = ''
        this.basicForm.redJson = ''
      }
    },
    'basicForm.ssfwDdFile': function (val) {
      if (val === '') {
        this.deteleFile('ss')
        this.basicForm.ssfwFwdd = ''
        this.basicForm.rangeEastJson = ''
      }
    },
    'basicForm.ssfwLqFile': function (val) {
      if (val === '') {
        this.deteleFile('ss2000')
        this.basicForm.ssfwFwlq = ''
        this.basicForm.rangeJson = ''
      }
    },
    projectStatus(val) {
      this.checkStatus = val
    }
  },
  mounted() {
    this.getAllOptions()
    this.getJsgsList()
  },
  methods: {
    // 管理员禁用情况：
    // 1.详情
    // 2.管理员账号 && 新增
    // 3.企业账号 && 审核完成状态
    getAdminDisabled() {
      if (
        this.isView ||
        (isAdmin() && this.checkStatus === '0')
        //  ||
        // (isEnterprise() && this.bpmStatus === '3')
      ) {
        return true
      } else {
        return false
      }
    },
    // 企业禁用情况：
    // 1.详情
    // 2.企业账号
    // 3.企业账号 && 审核完成状态
    getEnterpriseDisabled() {
      if (
        this.isView ||
        isEnterprise()
        //  ||
        // (isEnterprise() && this.bpmStatus === '3')
      ) {
        return true
      } else {
        return false
      }
    },
    // 所有选项
    getAllOptions() {
      queryOptions(
        'projectType,projectSdjg,xflx,projectStatus,zjly'
      ).then((res) => {
        if (res.success) {
          // 项目分类
          this.projectTypeOptions = res.data.filter(
            (i) => i.dictCode === 'projectType'
          )[0].resourceDictItems

          // 四大结构调整
          this.projectStructOptions = res.data.filter(
            (i) => i.dictCode === 'projectSdjg'
          )[0].resourceDictItems

          // 细分类型
          this.projectDivisionOptions = res.data.filter(
            (i) => i.dictCode === 'xflx'
          )[0].resourceDictItems

          // 项目状态
          this.projectStatusOptions = res.data.filter(
            (i) => i.dictCode === 'projectStatus'
          )[0].resourceDictItems

          // 资金来源
          this.projectCapitalOptions = res.data.filter(
            (i) => i.dictCode === 'zjly'
          )[0].resourceDictItems
        }
      })
    },

    // 建设单位
    getJsgsList() {
      queryJsgsList().then((res) => {
        if (res.success) {
          this.projectCompanyOptions = res.data.map(
            (item) => {
              return {
                label: item.deptName,
                value: item.pkid
              }
            }
          )
        }
      })
    },

    onFileSelect(file) {
      this.uploadLoading = true
      const index = this.fileList.findIndex(
        (i) => i.type === this.currentType
      )
      if (index !== -1) {
        this.fileList[index].file = file.raw
      } else {
        this.fileList.push({
          type: this.currentType,
          file: file.raw
        })
      }

      this.getFileId(file.raw, this.currentType)
    },

    // 上传文件获取Id
    getFileId(file, type) {
      const data = new FormData()
      data.append('file', file)

      const request1 = axios.create({
        baseURL:
          process.env.NODE_ENV === 'production'
            ? BASE_URL.replace('/data', '/dwgData')
            : '/dwgApi',

        timeout: 120000
      })
      request1({
        method: 'post',
        // url: '/resource/file/upload/file',
        url: '/map/upload/getGeoJson',
        data: data,
        onUploadProgress: (progressEvent) => {
          this.completePercentObj[this.currentType] =
            parseInt(
              ((progressEvent.loaded /
                progressEvent.total) *
                100) |
                0,
              10
            )
        }
      })
        .then((res) => {
          res = res.data
          if (res.success) {
            const id = res.data.fileId
            const geojson = res.data.geoJson
            const name = file.name
            switch (type) {
              case 'yd':
                this.$set(this.basicForm, 'ydmjFwdd', id)
                this.$set(
                  this.basicForm,
                  'landEastJson',
                  geojson
                )
                this.$set(
                  this.basicForm,
                  'ydmjDdFile',
                  name
                )
                break
              case 'yd2000':
                this.$set(this.basicForm, 'ydmjFwlq', id)
                this.$set(
                  this.basicForm,
                  'landJson',
                  geojson
                )
                this.$set(
                  this.basicForm,
                  'ydmjLqFile',
                  name
                )
                break
              case 'hx':
                this.$set(this.basicForm, 'hxmjFwdd', id)
                this.$set(
                  this.basicForm,
                  'redEastJson',
                  geojson
                )
                this.$set(
                  this.basicForm,
                  'hxmjDdFile',
                  name
                )
                break
              case 'hx2000':
                this.$set(this.basicForm, 'hxmjFwlq', id)
                this.$set(
                  this.basicForm,
                  'redJson',
                  geojson
                )
                this.$set(
                  this.basicForm,
                  'hxmjLqFile',
                  name
                )
                break
              case 'ss':
                this.$set(this.basicForm, 'ssfwFwdd', id)
                this.$set(
                  this.basicForm,
                  'rangeEastJson',
                  geojson
                )
                this.$set(
                  this.basicForm,
                  'ssfwDdFile',
                  name
                )
                break
              case 'ss2000':
                this.$set(this.basicForm, 'ssfwFwlq', id)
                this.$set(
                  this.basicForm,
                  'rangeJson',
                  geojson
                )
                this.$set(
                  this.basicForm,
                  'ssfwLqFile',
                  name
                )
                break
            }
            this.$message.success('上传成功')
            this.uploadLoading = false
          } else {
            this.$message.error(res.message)
            this.uploadLoading = false
          }
        })
        .catch(() => {
          this.$message.error('上传失败')
          this.uploadLoading = false
        })
    },

    // 删除文件
    deteleFile(type) {
      const index = this.fileList.findIndex(
        (item) => item.type === type
      )
      if (index !== -1) {
        this.fileList.splice(index, 1)
      }
    },

    uploadFile(type) {
      this.currentType = type
    },

    changeJszq() {
      this.$emit('changeJszq', this.basicForm.jszqArr)
    },

    previewMap(type) {
      const info = this.basicForm
      const index = this.fileList.findIndex(
        (item) => item.type === type
      )
      switch (type) {
        case 'yd2000':
          if (info.ydmjFwlq) {
            this.previewMapById(
              info.ydmjFwlq,
              info.landJson
            )
            this.dialogMapVisible = true
          } else {
            this.$message.warning('请先上传文件再预览')
          }
          break
        case 'hx2000':
          if (info.hxmjFwlq) {
            this.previewMapById(info.hxmjFwlq, info.redJson)
            this.dialogMapVisible = true
          } else {
            this.$message.warning('请先上传文件再预览')
          }
          break
        case 'ss2000':
          if (info.ssfwFwlq) {
            this.previewMapById(
              info.ssfwFwlq,
              info.rangeJson
            )
            this.dialogMapVisible = true
          } else {
            this.$message.warning('请先上传文件再预览')
          }
          break
      }
    },

    // 通过文件id预览
    previewMapById(id, geojsonStr) {
      this.headerTitle = '地图预览'
      this.loading = true
      if (!geojsonStr) {
        dwgFileById(id)
          .then((res) => {
            if (res.success) {
              this.currentFeature = JSON.parse(res.data)
              const area = turf.area(this.currentFeature)
              this.currentArea = area ? area.toFixed(2) : 0
              // this.dialogMapVisible = true
              // 更新地图预览
              this.countMapLoad++
            }
            this.loading = false
          })
          .catch(() => {
            this.loading = false
          })
      } else {
        this.currentFeature = JSON.parse(geojsonStr)
        if (
          this.currentFeature.type ===
            'FeatureCollection' &&
          this.currentFeature.features.length > 0 &&
          this.currentFeature.features[0].geometry &&
          this.currentFeature.features[0].geometry.type ===
            'GeometryCollection'
        ) {
          this.currentFeature.features[0].geometry.geometries =
            this.currentFeature.features[0].geometry.geometries.filter(
              (item) => {
                if (item) {
                  return item
                }
              }
            )
        }
        try {
          const area = turf.area(this.currentFeature)
          this.currentArea = area ? area.toFixed(2) : 0
        } catch (error) {
          console.log(error)
        }
        // this.dialogMapVisible = true
        // 更新地图预览
        this.countMapLoad++
        this.loading = false
      }
    },

    onMapLoad({ id, viewer }) {
      _viewer = viewer

      _viewer.scene.imageryLayers.addImageryProvider(
        new Cesium.TiandituImageryProvider({
          mapStyle: null,
          token: 'a49a9220798216424e34b531cb3fa5b2',
          url: 'https://t0.tianditu.gov.cn/img_w/wmts'
        }),
        0
      )
      const geojson = _viewer.dataSources.add(
        Cesium.GeoJsonDataSource.load(this.currentFeature)
      )
      _viewer.flyTo(geojson)
    },

    // 修改建设单位：同步修改建设单位
    handleChangeJSGS(value) {
      const company = this.projectCompanyOptions.filter(
        (item) => item.value === value
      )
      this.basicForm.ssdw = company[0].label
    },

    // 点击选择照片
    async onImageListSelect(file) {
      this.loading = true
      if (
        file.raw.type === 'image/png' ||
        file.raw.type === 'image/jpeg' ||
        file.raw.type === 'image/jpg'
      ) {
        const { success, id } = await this.getImageId(
          file.raw
        )
        if (success) {
          const reader = new FileReader()
          reader.onloadend = () => {
            this.basicForm.effectPicList.push({
              src: reader.result,
              pictureTime: '',
              pictureIntroduce: '',
              pictureId: id,
              file: file.raw
            })
          }
          reader.readAsDataURL(file.raw)

          // 上传照片跳转到底部
          // window.location.hash = "#progress-photo"
          setTimeout(() => {
            document
              .getElementById('progress-photo')
              .scrollIntoView()
          }, 100)
        }
      } else {
        ElMessage.warning('请上传png、jpg图片')
      }
    },

    // 上传图片获取Id
    async getImageId(file) {
      // debugger
      const result = {
        success: false,
        id: ''
      }
      const params = new FormData()
      params.append('file', file)
      await noticeFileUpload(params)
        .then((res) => {
          if (res.success) {
            result.success = true
            result.id = res.data
          }
          this.loading = false
        })
        .catch(() => {
          this.loading = false
        })
      return result
    },

    // 删除图片
    deletePhoto(index) {
      this.basicForm.effectPicList.splice(index, 1)
    },

    // 展示图片
    getImage(pkid) {
      return securityFileUrl(pkid)
    },

    // 新增地标
    handleAdd() {
      this.basicForm.sectionInfoList.push({
        pkid: '',
        sectionName: '',
        buildUnit: '',
        buildLeader: '',
        supervisorUnit: '',
        supervisor: '',
        orderIndex:
          this.basicForm.sectionInfoList.length + 1
      })
    },

    // 删除地标
    async handleDelete(index, item) {
      if (item.pkid) {
        const res = await queryJudgeExist('', item.pkid)
        if (res.data) {
          this.$message.warning(
            '该标段已有安全报告或巡查记录，不可删除'
          )
          return
        }
      }
      this.basicForm.sectionInfoList.splice(index, 1)
    },
    // 打开定位弹窗
    handleShowMap() {
      this.$refs.locationDialogRef.handleShowMap()
    },
    // 修改定位
    handleChangeAddress(val) {
      this.basicForm.address = val
    }
  }
}
</script>

<style lang="scss" scoped>
.project {
  &-part {
    margin-top: 10px;

    &-title {
      margin: 10px 0 30px 15px;
      line-height: 18px;
      font-size: 16px;
      display: flex;

      &::before {
        content: '';
        width: 6px;
        height: 18px;
        background: url('~@/assets/images/wisdom-construction/title-pre.png');
        position: absolute;
        left: 0;
        top: 10;
      }
      &-btn {
        color: #00baff;
        font-size: 14px;
        cursor: pointer;
        margin-left: 20px;
      }
    }

    &-content {
      padding-left: 10px;
      &-title {
        font-size: 16px;
        font-weight: 500;
        color: #4c565c;
        line-height: 16px;
        position: relative;
        padding-left: 15px;
        margin-bottom: 16px;
        &::before {
          position: absolute;
          content: ' ';
          width: 7px;
          height: 7px;
          background: #87ebf7;
          border-radius: 50%;
          top: 5px;
          left: 0;
        }
      }
    }
  }
}

.suffix {
  position: absolute;
  left: -90px;
  width: 50px;
  text-align: center;
}

.upload {
  cursor: pointer;
  height: 0px;

  &-text {
    position: absolute;
    top: -35px;
    left: 260px;
    color: #00baff;
  }

  &-icon {
    position: absolute;
    width: 16px;
    height: 14px;
    top: -22px;
    left: 240px;
    background: url('~@/assets/images/wisdom-construction/upload-file.png');
    background-size: 100% 100%;
  }
}

::v-deep {
  .el-form-item__label {
    height: 30px;
    // margin-left: 15px;
    margin-top: -20px;
  }

  .el-select {
    width: 100%;
  }

  .el-input__inner {
    width: 320px !important;
  }

  .el-textarea__inner {
    width: 320px !important;
  }

  .el-dialog {
    // height: 800px !important;
    .el-dialog__body {
      .content {
        padding: 0;
      }
    }
    .cesium-viewer {
      height: 520px !important;
    }
  }
}

.preview-button {
  position: absolute;
  top: 5px;
  left: 330px;
  background: #497fa3;
  border: 1px solid #497fa3;
  border-radius: 2px;
  color: white;
}

.upload-image {
  cursor: pointer;
  display: flex;
  margin-left: 20px;

  &-text {
    color: #00baff;
  }

  &-icon {
    width: 16px;
    height: 16px;
    background: url('~@/assets/images/wisdom-construction/upload-image.png');
    background-size: 100% 100%;
    margin-top: 2px;
  }
}
.progress {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  width: 100%;
  flex-flow: row wrap;

  &-item {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    margin: 0 65px 20px 0px;
    position: relative;

    .el-image {
      width: 200px;
      height: 140px;
      margin-bottom: 10px;
    }

    i {
      color: red;
      font-size: 24px;
      position: absolute;
      top: 0;
      right: 0;
      // top: -10px;
      cursor: pointer;
    }
    ::v-deep .el-input__inner {
      width: 200px !important;
    }
  }
}

.table {
  border-collapse: collapse;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 30px;
  &-btn {
    color: #f56c6c;
    font-size: 14px;
    cursor: pointer;
  }
  thead {
    background-color: #f2f6fb;
  }
  td,
  th {
    font-size: 14px;
    font-family: PingFang SC;
    font-weight: bold;
    color: #6b767d;
    line-height: 42px;
    border: 1px solid #f2f6fb;
    text-align: center;
  }
  td {
    font-weight: normal;
  }
  tbody {
    tr {
      td {
        &:nth-child(1) {
          width: 50px;
        }
        &:nth-child(2) {
          width: 300px;
        }
        &:nth-child(3) {
          width: 300px;
        }
        &:nth-child(4) {
          max-width: 1000px;
        }
        &:nth-child(5) {
          width: 300px;
        }
      }
    }
  }

  ::v-deep {
    .el-form-item {
      margin-bottom: 0px;
    }
    .el-input__inner {
      width: 100% !important;
    }

    .el-form-item__error {
      z-index: 2;
    }
  }
}

.el-icon-location {
  position: absolute;
  top: 5px;
  left: 295px;
  color: #00baff;
  font-size: 25px;
  cursor: pointer;
}
</style>
